package com.ye.pojo;

import com.alibaba.nacos.api.config.ConfigType;
import com.alibaba.nacos.api.config.annotation.NacosConfigurationProperties;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: TODO
 * @author: scott
 * @date: 2022年03月31日 15:33
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Configuration
//@NacosPropertySource(dataId = "data-id-student", groupId = "DEFAULT_GROUP", autoRefreshed = true, type = ConfigType.YAML)
@NacosConfigurationProperties(prefix = "student", dataId = "data-id-student", groupId = "DEFAULT_GROUP", autoRefreshed = true, ignoreInvalidFields = true, type = ConfigType.YAML)
public class Student {
    //@Value("${student.id}")
    private int id;
    //@Value("${student.name}")
    private String name;
    //@Value("${student.password}")
    private String password;
}
